//
//  WelcomePageController.m
//  YRSideViewController
//
//  Created by xiabin on 15/6/9.
//  Copyright (c) 2015年 YueRuo. All rights reserved.
//

#import "WelcomePageController.h"
#import "AppDelegate.h"

@interface WelcomePageController ()

@end

@implementation WelcomePageController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewDidAppear:(BOOL)animated {
    [self showIntroWithCrossDissolve];
}

- (void)showIntroWithCrossDissolve {
    EAIntroPage *page1 = [EAIntroPage page];
    //page1.title = NSLocalizedString(@"appname", nil);;
    //page1.desc = @"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
    page1.bgImage = [UIImage imageNamed:@"welcome"];
    //page1.titleImage = [UIImage imageNamed:@"original"];
    
    //EAIntroPage *page2 = [EAIntroPage page];
    //page2.title = NSLocalizedString(@"appname", nil);;
    //page2.desc = @"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore.";
    //page2.bgImage = [UIImage imageNamed:@"welcomePage2"];
    //page2.titleImage = [UIImage imageNamed:@"supportcat"];
    
    //EAIntroPage *page3 = [EAIntroPage page];
    //page3.title = NSLocalizedString(@"appname", nil);;
    //page3.desc = @"Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem.";
    //page3.bgImage = [UIImage imageNamed:@"welcomePage3"];
    //page3.titleImage = [UIImage imageNamed:@"femalecodertocat"];
    
    EAIntroView *intro = [[EAIntroView alloc] initWithFrame:self.view.bounds andPages:@[page1]];
    
    [intro setDelegate:self];
    [intro showInView:self.view animateDuration:0.0];
    
    [self performSelector:@selector(introDidFinish) withObject:nil afterDelay:3.0f];
}

- (void)introDidFinish {
    [(AppDelegate*)[[UIApplication sharedApplication]delegate] EnterApplogic];
    NSLog(@"Intro callback");
}
@end
